const Mock = require('mockjs');

const data = Mock.mock({
  'list|10': [
    {
      'orderNumber': 'SALON@String("number", 6)',
      customerName: '@cname',
      customerPhone: /^1[385][1-9]\d{8}/,
      orderDate: '@date("yyyy-MM-dd")',
      orderTime: '@time("HH:mm:ss")',
      'status|0-2': 0, // 0/1/2 三种状态
      product: {
        'productName|1': ['洗剪吹', '烫发', '染发']
      },
      employees: {
        'ename': '@cname'
      },
      assistant: {
        'aname': '@cname'
      }
    },
  ],
});

module.exports = [{
  url: '/order/listAll',
  type: 'get',
  response: _ => {
    return {
      code: 200,
      msg: '操作成功!',
      data: data.list
    }
  }
}]
